//========================================================================
//	created		:	2011/08/19
//	created		:	19:8:2011   14:31
//	filename	: 	LD_Figure.h
//	author		:	Kilst - Park Howon (South Korea)
//	
// 	project 	: 	Leagcy - MMORPG
//	purpose		:	
//========================================================================
#ifndef _LD_FIGURE_H_
#define _LD_FIGURE_H_
//------------------------------------------------------------------------
#include "../LBase/LBase.h"
//------------------------------------------------------------------------
namespace legacy {
//------------------------------------------------------------------------


// 
//------------------------------------------------------------------------s
class CLD_Figure {

private :
	BSTRING		m_Name ;
	INT	m_N ;

public :
	CLD_Figure () {}
	CLD_Figure ( const BSTRING& Name_, INT nN_ )
	{
		setName ( Name_ ) ;
		setN ( nN_ ) ;
	}
	~CLD_Figure () {}

public :
	void _initialize ()
	{

	}
	void _finalize ()
	{

	}


public :
	void setName ( BSTRING Value_ ) { m_Name = Value_ ; }
	void setN ( INT Value_ ) { m_N = Value_ ; }

	BSTRING getName () const { return m_Name ; }
	INT getN () const { return m_N ; }
	INT N () const { return m_N ; }

public :
	CLD_Figure& operator  = ( const CLD_Figure& Value_ )
	{
		if ( this == &Value_ ) return (*this) ;

		m_Name = Value_.m_Name ;
		m_N = Value_.m_N ;

		return (*this) ;
	}

	INT operator  = ( INT Value_ )
	{
		return m_N = Value_ ;
	}

	BSTRING operator  = ( const PCHAR pValue_ )
	{
		return m_Name = pValue_ ;
	}

	INT operator += ( INT Value_ )
	{
		return m_N += Value_ ;
	}

	INT operator ++ () { return m_N++ ; }
	// INT operator ++ ( const CLD_Figure& Value_ ) { return ++Value_.m_N ; }

	INT operator -- () { return m_N-- ; }

	/*
	template < class T_AllType >
	T_AllType operator  = ( const T_AllType& Value_ )
	{
		// setN ( INT( Value_ ) ) ;
		BSTRING Temp = Value_ ;

		return  m_Name = Temp ;
	}
	*/

	friend std::ostream& operator << ( std::ostream& cout_, const CLD_Figure& Value_ )
	{
		return cout_ << Value_.m_Name << "[" << Value_.m_N << "]" ;
	}

	friend std::ostream& operator << ( std::ostream& cout_, const CLD_Figure* this_ )
	{
		return cout_ << *this_ ;
	}


};
//------------------------------------------------------------------------


//------------------------------------------------------------------------
} 												// namespace legacy
//------------------------------------------------------------------------
#endif 											// _LD_FIGURE_H_
//========================================================================



